package edu.bbu.BS.swing;

import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

//import edu.bbu.bs.backend.service.beans.RemoteBean;
//import edu.bbu.bs.backend.service.beans.RemoteBeanInterface;

public class RemoteClient {

	/*public static void main(String[] args) {
		try {
			Context jndiContext = getInitialContext();
			Object ref = jndiContext.lookup("java:global/ejb_example/RemoteBean");

			RemoteBeanInterface remoteBean = (RemoteBeanInterface) PortableRemoteObject.narrow(ref, RemoteBean.class);

			System.out.println(remoteBean.osszead(10, 20));
		} catch (javax.naming.NamingException e) {
			e.printStackTrace();
		}
	}

	public static Context getInitialContext() throws javax.naming.NamingException {
		Properties props = new Properties();
		props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
		props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
		props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");

		return new InitialContext(props);
	}*/

}
